<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        /*flex-wrap:nowrap|wrap  设置flex布局子元素的换行 */
        .parent{
            width:500px;
            background: red;
            display: flex;
            height: 300px;
            justify-content: space-between;
            flex-wrap:wrap;

            /*  顶部内容居中效果*/
            align-items: center;
        }
        .parent div{
            width:100px;
            height: 100px;
            /* 排排站效果 */
            /* margin: 0 20px; */
            border:1px solid #333;
        }
        .parent>div:nth-child(6){
            margin-left: -139px;
            /* box-sizing: border-box; */
        }
    </style>
</head>
<body>
    <div class="parent">
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
    </div>
</body>
</html>